[<<Previous Entry]
[^^Up^^]
[Next Entry>>]
[Menu]
[About The Guide]
##############################################################################
###+-------+##################################################################
#+-| BUILD |--------------------------------------------+#####################
#| +-------+ The BUILD command creates the file <C-exp> |#####################
#| and then constructs a database header from |#####################
#| an <Alias> or from a <Field-list> |#####################
#+------------------------------------------------------+#####################
##############################################################################
##############################################################################
#+--| Syntax |------------------------------------------------------+#########
#| BUILD <C-exp> FROM [ALIAS <Alias> || FIELDS <Field-list>] |#########
#+------------------------------------------------------------------+#########
##############################################################################
##############################################################################
#######+---| Description |--------------------------------------------+#######
#######| BUILD does not open the file <C-exp>: it is not ready for |#######
#######| appending, replacing, etc. The file must be opened after it |#######
#######| has been built. BUILD replaces the COPY STRUCTURE EXTENDED |#######
#######| command of dBASE. |#######
#######+--------------------------------------------------------------+#######
##############################################################################
##############################################################################
#########+--| Example 1 |-------------------------------------------+#########
#########| * Build a database from the alias definition. |#########
#########| |#########
#########| DBFDEF employee |#########
#########| CHAR(20) name |#########
#########| DATE start |#########
#########| DBL(5:2) salary |#########
#########| CHAR(30) position |#########
#########| ENDDEF |#########
#########| |#########
#########| PROCEDURE force_main |#########
#########| BUILD "employe.dbf" FROM ALIAS employee |#########
#########| BUILD "names.dbf" FROM FIELDS employee->name, ; |#########
#########| employee->position |#########
#########| ENDPRO |#########
#########+----------------------------------------------------------+#########
##############################################################################
##############################################################################
#########+--| Example 2 |-------------------------------------------+#########
#########| * Create database if it doesn't exist at the |#########
#########| * start of an application. |#########
#########| |#########
#########| DBFDEF names |#########
#########| CHAR(30) name |#########
#########| CHAR(30) addr |#########
#########| ENDDEF |#########
#########| |#########
#########| PROCEDURE force_main |#########
#########| IF .NOT. exist( "names.dbf" ) |#########
#########| BUILD "names.dbf" ALIAS names |#########
#########| ENDDEF |#########
#########| USE names |#########
#########| {...} |#########
#########+----------------------------------------------------------+#########
##############################################################################
See Also:
OPEN
USE
This page created by ng2html v1.05, the Norton guide to HTML conversion utility.
Written by Dave Pearson